/*
package com.ruoyi.web.controller;

import com.ruoyi.SmsUtil;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.concurrent.TimeUnit;

public class send {
    */
/**
     * 发送短信
     * @param phone
     * @return
     *//*

    @RequestMapping("sendCode")
    public static boolean sendMessage(@RequestParam String phone){
        try {
            String code = SmsUtil.sendSms(phone);
            //使用redis 存起来，过期时间300秒，用于登录时拿出来验证
           // redisTemplate.opsForValue().set("yzm"+phone,code,300, TimeUnit.SECONDS);

            return true;
        } catch (Exception e) {
            return false;
        }
    }
    public static void main(String[] args) throws Exception {
        boolean send1=sendMessage("18239569506");
    }
}
*/
